class Person{
    constructor(public name:string,public age:number){
        this.name = name
        this.age = age
    }
    sayName(){
        console.log(this.name);
        
    }
}

const sunWuKong = new Person("孙悟空",18)
sunWuKong.sayName()